﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Skybot.NewWork.Graph
{
    /// <summary>
    /// 点原素
    /// </summary>
    public class PointElement : System.ComponentModel.INotifyPropertyChanged
    {
        private Point _Point = new Point();

        /// <summary>
        /// 点原素
        /// </summary>
        public Point Point
        {
            get { return _Point; }
            set
            {
                _Point = value;
                OnPropertyChanged("Point");
            }
        }

        private Color color = Colors.Transparent;

        /// <summary>
        /// 颜色
        /// </summary>
        public Color Color
        {
            get { return color; }
            set
            {
                if (value != color)
                {
                    color = value;
                    OnPropertyChanged("Color");
                }
            }
        }

        private double _StrokeThickness = 3.0;

        /// <summary>
        /// 边框宽度
        /// </summary>
        public double StrokeThickness
        {
            get { return _StrokeThickness; }
            set
            {
                if (value != _StrokeThickness)
                {
                    _StrokeThickness = value;
                    OnPropertyChanged("StrokeThickness");
                }
            }
        }

        private String _Title = string.Empty;
        /// <summary>
        /// 标题
        /// </summary>
        public String Title
        {
            get { return _Title; }
            set
            {
                _Title = value;
                OnPropertyChanged("Title");
            }
        }

        private double _radius = 1.0;

        /// <summary>
        /// 半径
        /// </summary>
        public double Radius
        {
            get { return _radius; }
            set
            {
                if (_radius != value)
                {
                    _radius = value;
                    OnPropertyChanged("Radius");

                }
            }
        }

        private Ellipse _Ellipse = null;
        /// <summary>
        /// 原素数据
        /// </summary>
        public Ellipse Ellipse
        {
            get { return _Ellipse; }
            set
            {
                _Ellipse = value;
            OnPropertyChanged("Ellipse");
            }
        }

        private ElEntity _ElEntity = null;
        /// <summary>
        /// 原素实体
        /// </summary>
        public ElEntity ElEntity
        {
            get { return _ElEntity; }
            set
            {
                _ElEntity = value;
                OnPropertyChanged("ElEntity");
            }
        }
        #region INotifyPropertyChanged 接口

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// 引发内部事件的方法 
        /// </summary>
        /// <param name="Name"></param>
        protected void OnPropertyChanged(string Name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(Name));
            }
        }


        #endregion

    }
}
